package com.example.bookstore.api

import com.example.bookstore.dao.TopRecommendedBookDao
import com.example.bookstore.entity.TopRecommendedBookEntity
import com.example.bookstore.service.TopRecommendedBookService
import com.example.bookstore.validate.PageNSizeValidate
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * Created by IntelliJ IDEA.
 * Book: lvshe
 * Date: 2019/8/10
 * Time: 15:14
 */
@Api(tags = ["热门推荐"], basePath = "/api/topRecommended")
@RestController
@RequestMapping("/api/topRecommended")
class TopRecommendedBookController : BaseController<TopRecommendedBookService, TopRecommendedBookDao, TopRecommendedBookEntity>() {

    @GetMapping("/list")
    @ApiOperation("获取热门推荐列表", notes = "获取热门推荐列表")
    override fun getAllPageable(@Validated pageNSizeValidate: PageNSizeValidate): MutableList<TopRecommendedBookEntity> {
        return super.getAllPageable(pageNSizeValidate)
    }

}